﻿@model SettingCondition
@Html.Extra()
@{
    Layout = "~/Views/Shared/OA/_Query.cshtml";
}
@section Keyword
{
    @Html.TextBoxFor(model => model.Name, new { placeholder = "搜索名称", title = "搜索名称" })
}
@section Advance
{
    <table>
        <tr>
            <th>
                @Html.LabelFor(model => model.Name, "名称")
            </th>
            <td>
                @Html.MyNet().TextBoxFor(model => model.Name)
            </td>
        </tr>
        <tr>
            <th>
                @Html.LabelFor(model => model.Key, "代码")
            </th>
            <td>
                @Html.MyNet().TextBoxFor(model => model.Key)
            </td>
        </tr>
        <tr>
            <th>
                @Html.LabelFor(model => model.Type, "类型")
            </th>
            <td>
                @Html.MyNet().DropDownListFor(model => model.Type,
                new[]
                {
                    new { Value = (int)SettingType.Value, Name = SettingType.Value.ToText() },
                    new { Value = (int)SettingType.Enum, Name = SettingType.Enum.ToText() }
                }, "Value", "Name", "所有类型")
            </td>
        </tr>
        @if (string.IsNullOrEmpty(Request["Application"]))
        {
            <tr>
                <th>
                    @Html.LabelFor(model => model.Application, "应用")
                </th>
                <td>
                    @Html.MyNet().DropDownListFor(model => model.Application, Url.Action("Read", "Application"), "Key", "Name", "所有应用")
                </td>
            </tr>
        }
        else
        {
            Model.Application = Request["Application"];
            @Html.HiddenFor(model => model.Application)
        }
    </table>
}
